package com.yida.gwj.scene.expend.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yida.common.core.utils.DateUtils;
import com.yida.gwj.scene.expend.domain.GwjSceneExpendBusinessCommunity;
import com.yida.gwj.scene.expend.mapper.GwjSceneExpendBusinessCommunityMapper;
import com.yida.gwj.scene.expend.service.IGwjSceneExpendBusinessCommunityService;

/**
 * 业务小区信息（旧支出模块）Service业务层处理
 * 
 * @author hmh
 * @date 2023-08-14
 */
@Service
public class GwjSceneExpendBusinessCommunityServiceImpl implements IGwjSceneExpendBusinessCommunityService {
    @Autowired
    private GwjSceneExpendBusinessCommunityMapper gwjSceneExpendBusinessCommunityMapper;

    /**
     * 查询业务小区信息（旧支出模块）
     * 
     * @param bizCommunityId 业务小区信息（旧支出模块）主键
     * @return 业务小区信息（旧支出模块）
     */
    @Override
    public GwjSceneExpendBusinessCommunity selectGwjSceneExpendBusinessCommunityByBizCommunityId(Long bizCommunityId) {
        return gwjSceneExpendBusinessCommunityMapper.selectGwjSceneExpendBusinessCommunityByBizCommunityId(bizCommunityId);
    }

    /**
     * 查询业务小区信息（旧支出模块）列表
     * 
     * @param gwjSceneExpendBusinessCommunity 业务小区信息（旧支出模块）
     * @return 业务小区信息（旧支出模块）
     */
    @Override
    public List<GwjSceneExpendBusinessCommunity> selectGwjSceneExpendBusinessCommunityList(GwjSceneExpendBusinessCommunity gwjSceneExpendBusinessCommunity) {
        return gwjSceneExpendBusinessCommunityMapper.selectGwjSceneExpendBusinessCommunityList(gwjSceneExpendBusinessCommunity);
    }

    /**
     * 新增业务小区信息（旧支出模块）
     * 
     * @param gwjSceneExpendBusinessCommunity 业务小区信息（旧支出模块）
     * @return 结果
     */
    @Override
    public int insertGwjSceneExpendBusinessCommunity(GwjSceneExpendBusinessCommunity gwjSceneExpendBusinessCommunity) {
        gwjSceneExpendBusinessCommunity.setCreateTime(DateUtils.getNowDate());
        return gwjSceneExpendBusinessCommunityMapper.insertGwjSceneExpendBusinessCommunity(gwjSceneExpendBusinessCommunity);
    }

    /**
     * 修改业务小区信息（旧支出模块）
     * 
     * @param gwjSceneExpendBusinessCommunity 业务小区信息（旧支出模块）
     * @return 结果
     */
    @Override
    public int updateGwjSceneExpendBusinessCommunity(GwjSceneExpendBusinessCommunity gwjSceneExpendBusinessCommunity) {
        gwjSceneExpendBusinessCommunity.setUpdateTime(DateUtils.getNowDate());
        return gwjSceneExpendBusinessCommunityMapper.updateGwjSceneExpendBusinessCommunity(gwjSceneExpendBusinessCommunity);
    }

    /**
     * 批量删除业务小区信息（旧支出模块）
     * 
     * @param bizCommunityIds 需要删除的业务小区信息（旧支出模块）主键
     * @return 结果
     */
    @Override
    public int deleteGwjSceneExpendBusinessCommunityByBizCommunityIds(Long[] bizCommunityIds) {
        return gwjSceneExpendBusinessCommunityMapper.deleteGwjSceneExpendBusinessCommunityByBizCommunityIds(bizCommunityIds);
    }

    /**
     * 删除业务小区信息（旧支出模块）信息
     * 
     * @param bizCommunityId 业务小区信息（旧支出模块）主键
     * @return 结果
     */
    @Override
    public int deleteGwjSceneExpendBusinessCommunityByBizCommunityId(Long bizCommunityId) {
        return gwjSceneExpendBusinessCommunityMapper.deleteGwjSceneExpendBusinessCommunityByBizCommunityId(bizCommunityId);
    }

    /* 
     * 根据业务ID查询项目信息
     */
    @Override
    public GwjSceneExpendBusinessCommunity selectGwjSceneExpendBusinessCommunityByBizId(Long bizId) {
        return gwjSceneExpendBusinessCommunityMapper.selectGwjSceneExpendBusinessCommunityByBizId(bizId);
    }

    /**
     * 根据业务ID删除业务小区信息（旧支出模块）信息
     * 
     * @param bizCommunityId 业务小区信息（旧支出模块）主键
     * @return 结果
     */
    @Override
    public int deleteGwjSceneExpendBusinessCommunityByBizId(Long bizId) {
        return gwjSceneExpendBusinessCommunityMapper.deleteGwjSceneExpendBusinessCommunityByBizId(bizId);
    }
}
